package com.example.film.controller;

import com.example.film.entity.ReadyFilm;
import com.example.film.service.ReadyFilmService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "即将上映电影信息管理接口")
@CrossOrigin
@RestController
@RequestMapping("film/v1")
public class ReadyFilmController {
    @Autowired
    private ReadyFilmService readyFilmService;

    @ApiOperation("即将上映电影信息")
    @GetMapping("/readyFilm")
    public List<ReadyFilm> getReadyFilm(){
        return readyFilmService.findReadyFilm();
    }
}
